#FROM cimg/openjdk:17.0.11
FROM openjdk:17

LABEL maintainer="guofangchaovip@163.com"
ENV TZ=Asia/Shanghai
WORKDIR /root

COPY target/*.jar /root/app.jar

ENV JAVA_OPTS="-Xms128m -Xmx256m"
ENV PARAMS=""

EXPOSE 8080

#ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS", "-jar", "/root/app.jar", "$PARAMS"]
ENTRYPOINT ["java", "-jar", "/root/app.jar", "$PARAMS"]

# 运行命令 docker run -p 8588:8080 -e PARAMS="--spring.profiles.active=dev --server.port=8080" -e JAVA_OPTS="-Xms128m -Xmx256m" simon/jenkins-demo:latest
